public class Test {
    public static void main(String[] args) {
        BinaryTree binaryTree = new BinaryTree();
        BinaryTree.TreeNode root = binaryTree.createTree();
        binaryTree.preOrder(root);
        System.out.println();
        binaryTree.inOrder(root);
        System.out.println();
        binaryTree.postOrder(root);
        System.out.println();
        binaryTree.size(root);
        System.out.println(binaryTree.nodeSize);
        //静态变量需要通过类或者对象来调用
        binaryTree.getLeafNodeCount1(root);
        System.out.println(binaryTree.leafSize);
        System.out.println(binaryTree.getLeafNodeCount2(root));
        System.out.println(binaryTree.getKLevelNodeCount(root, 4));
        System.out.println(binaryTree.getHeight(root));
        System.out.println("==============查找===========");
        BinaryTree.TreeNode ret = binaryTree.find(root, 'A');
        System.out.println(ret.val);
        System.out.println("=====层序遍历====");
        binaryTree.levelOrder(root);
    }
}
